<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 事件节流 -->
    <!-- 将短时间内同一事件连续多次执行，变为每间隔执行一次 -->
    <input type="text" oninput="newhalder()">
</body>
</html>
<script>
    function handler(){
        console.log("我被点击了");
    }
    function miand (func ,time){
        var timerid = null
        return function(){
            if(!timerid){
                timerid = setTimeout(()=>{
                    func()
                    clearTimeout(timerid)
                    timerid = null
                },time)
            }
        }
    }
    var newhalder = miand(handler,100)
</script>